package org.codeart.driver.controller;

import org.codeart.common.util.R;
import org.codeart.driver.service.CityDriverUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/city-driver")
public class CityDriverController {
    
    @Autowired
    private CityDriverUserService cityDriverUserService;
    
    @GetMapping("/is-available")
    public R<Boolean> isAvailable(@RequestParam("cityCode") String cityCode) {
        boolean b = cityDriverUserService.ifAvailable(cityCode);
        return R.ok(b);
    }
    

}
